﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EMIS
{
    public partial class Helper
    {
        string sid;

        public bool Login(string sid, string password)
        {
            http = new Http();
            http.Encoding = Encoding.GetEncoding("gb2312");
            http.Add("user", sid);
            http.Add("password", password);
            http.Add("UserStyle", "student");
            string html = http.Post("http://210.45.240.29/pass.asp");
            //string html = http.Post("http://127.0.0.1:2011/pass.asp");
            if (string.IsNullOrWhiteSpace(html) || html.Contains("错误"))
                return false;
            this.sid = sid;
            return true;
        }
    }
}
